package com.cgly.medical.mapper;

import com.cgly.medical.domain.Account;
import com.cgly.medical.domain.Doctor;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wangxiangli
 * @create 2022-08-16-15:18
 */
@Repository
public interface DoctorMapper {

    //查询所有医生的信息
    List<Doctor> selectAll(Doctor doctor);


//    修改医师方法
    int updateDoctorInfo(Doctor doctor);

    //通过id查询医师信息
    Doctor selectDoctorByid(String id);

    //通过id删除医师信息
    int deleteDoctorinfo(String id);

    //添加医师信息
    int addDoctorinfo(Doctor doctor);

    //通过phone去查找用户对象
    Account selectAccountByPhone(String phone);

    //通过typeId查询医师信息
    List<Doctor> selectByTypeId(Integer typeId);

    //通过phone查找doctor对象
    Doctor selectDoctorByPhone(String phone);

    Long getDoctorId(String username);
}
